using System;
using System.Collections.Generic;
using System.Text;
using Objects;

namespace DAL
{
    public class DALThongTinDuyet
    {
        public List<ThongTinDuyet> GetAllItem(int idKhachHang, DateTime NgayDangKy)
        {
            List<ThongTinDuyet> ListThongTinDuyet = new List<ThongTinDuyet>();

            clsDataAccess acc = new clsDataAccess();

            string[] sname = new string[] { "@idKhachHang", "@NgayDangKy" };
            string[] vname = new string[] { idKhachHang.ToString(), NgayDangKy.ToString() };
            System.Data.DataSet ds = acc.CommandSelect("ThongTinDuyet_GetAllItem", sname, vname);

            ThongTinDuyet Item = new ThongTinDuyet();

            for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
            {
                System.Data.DataRow dr = ds.Tables[0].Rows[i];
                ListThongTinDuyet.Add((Item.Populate(dr)));
            }
            return ListThongTinDuyet;
        }
    }
}
